home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / rexx / cl-setpointuserproxy.clrexx < prev    next >
Encoding:
Text File  |  1996-02-05  |  2.3 KB  |  92 lines

  1. /*
  2. **  $VER: CL-SetPointuserProxy.clrexx 1.2 (05 Feb 1996)
  3. **
  4. **        © 1995-96 Ralf Ramge
  5. **
  6. **  PROGRAMNAME:
  7. **      CL-SetPointuserProxy.clrexx
  8. **
  9. **  FUNCTION:
  10. **     Demonstrationsskript zur cl_rexx.library, Connectline 5.0
  11. **
  12. **     Connectline © 1986-1995 Oliver Wagner, Mathias Mischler
  13. **     cl_rexx.library © 1995 Mathias Mischler
  14. **
  15. **     Dieses Skript setzt rücksichtslos sämtliche Vertreter der User,
  16. **     die im System einen Point haben, auf username@pointname. Hier-
  17. **     durch wird vermieden, daß Nachrichtenverluste entstehen, weil
  18. **     ein User am Vertreter herumgespielt hat und mittlerweile der
  19. **     Cruncher wieder zuschlug - das Skript ist also auch für den Auf-
  20. **     ruf per Cron geeignet.
  21. **
  22. */
  23.  
  24. param=arg(1)
  25.  
  26. /* Libs öffnen */
  27.  
  28. if ~show('L','rexxsupport.library') then do
  29.     if ~addlib('rexxsupport.library',0,-30,0) then exit 10
  30.     end
  31.  
  32. if ~show('L','cl_rexx.library') then do
  33.     if ~addlib('cl_rexx.library',0,-30,0) then exit 10
  34.     end
  35.  
  36. /* Fontsize ermitteln */
  37.  
  38. gfxbase=showlist(l,'graphics.library',0,a)
  39. call forbid
  40. FontAddress=next(gfxbase,154)
  41. Fontsize=c2d(IMPORT(offset(FontAddress,20),2))
  42. call permit
  43. windowwidth=Fontsize*50
  44. windowheight=Fontsize*15
  45. windowY=Fontsize+1
  46. WindowX=Fontsize
  47.  
  48.  
  49.  
  50. /* Standard-IO umleiten */
  51.  
  52. screen=CLGET_FrontScreenName()
  53.  
  54. call close STDOUT
  55. if ~open(STDOUT,'CON:'windowX'/'windowY'/'windowwidth'/'windowheight'/CL-SetPointuserProxy/SCREEN'screen,'W') then
  56.     exit 20
  57. else do
  58.     call close STDIN
  59.     call open STDIN,'*',R
  60.     call pragma '*'
  61.     end
  62.  
  63.  
  64. /* Hauptroutine */
  65.  
  66.  
  67. anzahl=CLGET_UserNumberOf()                       /* Userzahl ermitteln */
  68.  
  69. do x=1 to anzahl
  70.     user=CLGET_Username(x)                        /* Username ermitteln */
  71.     pointname=CLGET_UserPointName(user)           /* Pointname ermitteln */
  72.     if pointname~='' then do                      /* User ist Pointuser */
  73.                                                   /* Vertreter setzen */
  74.         vertreter=user||'@'||pointname
  75.         say 'Setze Vertreter von 'user' auf 'vertreter'.'
  76.         call CLSET_UserCopyTo(user,vertreter)
  77.         end
  78.     end
  79.  
  80. call CL_LogAdd(0,'SETPPROXY','Vertreter der Points korrigiert')
  81.  
  82. /* Programm beenden */
  83.  
  84. if param='' then do
  85.     options prompt "<Bitte drücken Sie RETURN>"
  86.     pull dummy
  87.     end
  88.  
  89. call close STDOUT
  90. call close STDIN
  91. exit
  92.